﻿<template>
  <div class="wrapper">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>采购管理</el-breadcrumb-item>
      <el-breadcrumb-item>供应商信息管理</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <p style="text-align: right;">
        <el-button type="warning" size="mini" @click="dialogVisable=true">添加供应商</el-button>
      </p>
    <el-table
    :data="tableData"
  
    :header-cell-style="{background:'rgb(55,61,65)', color:'#fff','text-align':'center'}"
    :cell-style="{'text-align':'center'}"
    style="width: 100%">
    <el-table-column
      prop="unit_name"
      label="单位名称"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址"
      width="180">
    </el-table-column>
    <el-table-column
      prop="contact_name"
      label="联系人"
      width="180">
    </el-table-column>
    <el-table-column
      prop="phone"
      label="电话号码"
      width="180">
    </el-table-column>
    <el-table-column
      prop="zip_code"
      label="邮编"
      width="180">
    </el-table-column>
    <el-table-column
      prop="fax"
      label="传真"
      width="180">
    </el-table-column>
    <el-table-column
      prop="email"
      label="邮箱地址"
      width="180">
    </el-table-column>
    <el-table-column
      prop="status"
      label="操作"
      >
      <template slot-scope="scope">
            <el-button @click="delete(scope.row)" icon="el-icon-delete" style="color:red" type="text"></el-button>
        </template>
    </el-table-column>
    
    </el-table>
    <el-dialog
  title="添加供应商"
  :visible.sync="dialogVisable"
  width="40%"
  >
  <el-form label-position="top" :model="itemInfo">
    <el-form-item label="单位名称">
      <el-input v-model="itemInfo.unit_name"></el-input>
    </el-form-item>
    <el-form-item label="地址">
      <el-input v-model="itemInfo.address"></el-input>
    </el-form-item>
    <el-form-item label="联系人">
      <el-input v-model="itemInfo.contact_name"></el-input>
    </el-form-item>
    <el-form-item label="电话号码">
      <el-input v-model="itemInfo.phone"></el-input>
    </el-form-item>
    <el-form-item label="邮编">
      <el-input v-model="itemInfo.zip_code"></el-input>
    </el-form-item>
    <el-form-item label="传真">
      <el-input v-model="itemInfo.fax"></el-input>
    </el-form-item>
    <el-form-item label="邮箱地址">
      <el-input v-model="itemInfo.email"></el-input>
    </el-form-item>
  </el-form>
  <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisable = false">关闭</el-button>
    <el-button type="primary" @click="dialogVisable = false">添加</el-button>
  </span>
</el-dialog>
    </el-card>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      // 对话框
      dialogVisable:false,
      // 数据
      tableData:[{}],
      // 供应商数据
      itemInfo:{
        unit_name:'',

      }
    };
  },
  watch: {},
  computed: {},
  methods: {
    //删除操作
     delete(e){

    }
  },
  created() {},
  mounted() {}
};
</script>
<style lang="less" scoped>
.wrapper{}
</style>
